function init() {
		
	var personal=[
		{key:1, label:"Cristina"},
		{key:2, label:"Beatriz"},
		{key:3, label:"Sara"},
		{key:4, label:"Nuria"}
	];
	
	var tratamientos=[
		{key:1, label:"Laser Diodo"},
		{key:2, label:"Radiofrecuencia"},
		{key:3, label:"Facial"},
		{key:4, label:"Corporal"}
	];
	
	scheduler.locale.labels.unit_tab = "Personas";
	scheduler.locale.labels.section_custom="Section";
	scheduler.config.details_on_create=true;
	scheduler.config.details_on_dblclick=true;
	scheduler.config.xml_date="%Y-%m-%d %H:%i";
	
	scheduler.templates.hour_scale = function(date){
		var hour = date.getHours();
		var top = '00';
		var bottom = '30';
		if(hour==0)
			top = 'AM';
		if(hour==12)
			top = 'PM';
		hour =  ((date.getHours()+11)%12)+1;
		var html = '';
		var section_width = Math.floor(scheduler.xy.scale_width/2);
		var minute_height = Math.floor(scheduler.config.hour_size_px/2);
		html += "<div class='dhx_scale_hour_main' style='width: "+section_width+"px; height:"+(minute_height*2)+"px;'>"+hour+"</div><div class='dhx_scale_hour_minute_cont' style='width: "+section_width+"px;'>";
		html += "<div class='dhx_scale_hour_minute_top' style='height:"+minute_height+"px; line-height:"+minute_height+"px;'>"+top+"</div><div class='dhx_scale_hour_minute_bottom' style='height:"+minute_height+"px; line-height:"+minute_height+"px;'>"+bottom+"</div>";
		html += "<div class='dhx_scale_hour_sep'></div></div>";
		return html;		
	};
	
	scheduler.locale.labels.workweek_tab = "Semana"	
	scheduler.attachEvent("onTemplatesReady",function(){
		//work week
		scheduler.date.workweek_start = scheduler.date.week_start;
		scheduler.templates.workweek_date = scheduler.templates.week_date;
		scheduler.templates.workweek_scale_date = scheduler.templates.week_scale_date;
		scheduler.date.add_workweek=function(date,inc){ return scheduler.date.add(date,inc*6,"day"); }
		scheduler.date.get_workweek_end=function(date){ return scheduler.date.add(date,6,"day"); }
	});
	
	scheduler.config.first_hour = 10;
	scheduler.config.last_hour = 21;
	scheduler.blockTime(6, [0,10*60,14*60,24*60]);
	
	var format=scheduler.date.date_to_str("%H:%i"); 
	scheduler.templates.tooltip_text = function(start,end,event) {
		return "<b>Tratamiento:</b> "+event.text+"<br/><b>Comienzo:</b> "+format(start)+"<br/><b>Fin:</b> "+format(end);
	};
	
	scheduler.config.lightbox.sections=[	
		{name:"tratamiento", height:23, type:"select", options:tratamientos, map_to:"tratamiento_id" },
		{name:"profesional", height:23, type:"select", options:personal, map_to:"personal_id" },
		{name:"description", height:80, type:"textarea", map_to:"text", focus:true},
		{name:"time", height:72, type:"calendar_time", map_to:"auto"}
	]
	
	scheduler.createUnitsView({
		name:"unit",
		property:"section_id",
		list:personal
	});
	
	scheduler.config.mark_now = true;
	scheduler.init('scheduler_here',new Date(),"unit");
	//scheduler.load("data/units.xml");	
	//scheduler.load("data/events.xml");	

}